{% extends "common/base.side.html" %}

{% block title %}
    List Grade
{% endblock %}

{% block rcontent %}
    <div class="btn-toolbar">
        <div class="btn-group">
            {% url "addgradeurl" as theaddgradeurl %}
            <a class="btn btn-default {% if request.path == theaddgradeurl %} active {% endif %}"
               href={{ theaddgradeurl }}><span class="glyphicon glyphicon-edit"></span>添加评分选项</a>
            {% url "listgradeurl" as thelistgradeurl %}
            <a class="btn btn-default {% if request.path == thelistgradeurl %} active {% endif %}"
               href={{ thelistgradeurl }}><span class="glyphicon glyphicon-list"></span>评分列表</a>
        </div>
    </div>

    <hr/>

    <table class="table table-hover table-striped  table-bordered table-condensed">
        <tr>
            <th>评分</th>
            <th>操作</th>
        </tr>

        {% for i in lPage %}
            <tr style="font-size: 13px;">
                <td>{{ i.grade }}</td>
                <td class="host_buttom">
                    <a href={% url "editgradeurl" i.id %} onclick="return confirm('是否确认编辑？')"><span class="glyphicon glyphicon-edit btn-xs"></span></a>
                    <a href={% url "deletegradeurl" i.id %} onclick="return confirm('是否确认删除？')"><span class="glyphicon glyphicon-trash btn-xs"></span></a>
            </tr>
        {% endfor %}

    </table>

    {% include "common/paginator.html" %}
{% endblock %}
